package de.hsma.srn.view.components;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.JButton;

public class Button extends JButton {
	/**
	 * UID
	 */
	private static final long serialVersionUID = -1723828529316210715L;

	public Button(String text) {
		super(text);
		this.setFont(new Font("Helvetica", Font.BOLD, 12));
		this.setForeground(new Color(255, 255, 255));
		this.setBackground(new Color(140, 180, 204));
		this.setBorder(null);
		this.setOpaque(true);
		this.setPreferredSize(new Dimension(100,25));
		this.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mouseEntered(java.awt.event.MouseEvent evt) {
				setForeground(new Color(255, 172, 88));
				setBackground(new Color(225, 235, 242));
				setBorder(BorderFactory.createLineBorder(new Color(140, 180, 204)));
			}
			public void mouseExited(java.awt.event.MouseEvent evt) {
				setForeground(new Color(255, 255, 255));
				setBackground(new Color(140, 180, 204));
				setBorder(null);
			}
		});
	}
}
